package com.shangjinrong.controller.site;

import com.shangjinrong.result.R;
import com.shangjinrong.service.DictService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("site/dict")
@Slf4j
public class SiteDictController {
    @Autowired
    private DictService dictService;

    @GetMapping("findDictByCode/{code}")
    public R findDictByCode(@PathVariable String code) {
        return R.ok().data("dictList", dictService.findDictByCode(code));
    }
}
